package main.java.com.example.mainstream.model;

import android.app.Application;

import androidx.annotation.NonNull;
import androidx.lifecycle.AndroidViewModel;
import androidx.lifecycle.MutableLiveData;

import com.example.shopapp.bean.Communication;

import java.util.ArrayList;
import java.util.List;

public class CommunicationModel extends AndroidViewModel {
    private MutableLiveData<List<Communication>> communicationliveData;

    public CommunicationModel(@NonNull Application application) {
        super(application);
        communicationliveData = new MutableLiveData<>();
    }

    public MutableLiveData<List<Communication>> getCommunicationList() {
        List<Communication> communications = new ArrayList<>();
        if (communications ==null || communications.size() == 0){
            communications.add(new Communication("【雪城巾帼新农人“云”学堂 ⑲】农技大讲堂 测土配方施肥技术（一）","","https://m.thepaper.cn/baijiahao_19322437","2024-03-31 14:52"));
            communications.add(new Communication("兴农学堂丨实干争春早 奋进正当时","","https://mp.weixin.qq.com/s?__biz=MzA4MDQ1NDE3NQ==&mid=2650576682&idx=2&sn=4c2030822516b2e22a785b616c4ebef5&chksm=87abc05ab0dc494c6717f8b187ff73f068f46fdbbc3cf614c9b627295f367f5bdaf909cb6942&scene=27","2023-07-31 14:52"));
            communications.add(new Communication("看看这群“后浪”服务家乡的故事","","https://mp.weixin.qq.com/s?__biz=MzA4ODAwMDMwMg==&mid=2650626367&idx=1&sn=f09eff86560de7d62cf444777f643c8d&chksm=88392b7ebf4ea26800ee601cab0db9da4c898f71afc3c00e1a034745b8dea0682fa928af84d2&scene=27","2023-08-31 14:52"));
            communications.add(new Communication("种植案例：从种到收只要4天，5元/斤还供不应求，周期短，效益高","","https://mp.weixin.qq.com/s?__biz=MzA5MjgzOTU0NA==&mid=2651110940&idx=4&sn=8427c3b804fcc6b9c1c4efd519dd8ba2&chksm=8b97150bbce09c1d43d5eb1f2c51808dbfb2658650fcecd2ecc06b778ee203217684a9f113c1&scene=27","2023-07-05 00:03"));
            communications.add(new Communication("【农牧民微课堂】白菜种植方法","https://5b0988e595225.cdn.sohucs.com/images/20200107/c942bb90ac984dcb8e90ea422c3fb063.jpeg","https://mp.weixin.qq.com/s?__biz=MzIwMDA4NjgyNA==&mid=2654081526&idx=5&sn=e27581ae64babf84bd81d2c6607e9d79&chksm=8d4435b1ba33bca76432aa881854182d297f7a721b141032bc36abe9b74773012ae6c8023a72&scene=27","2023-09-04 18:06"));
            communications.add(new Communication("农作物也有朋友圈，学一学“好朋友”种植法，让农场的收入快速翻番","https://pic1.zhimg.com/80/v2-ea01e587f932241e07a0aed0524cb188_720w.webp","https://zhuanlan.zhihu.com/p/73318774","2023-08-05 00:03"));
            communications.add(new Communication("龙文进：珍视和传递夏粮丰收的成果","https://5b0988e595225.cdn.sohucs.com/images/20190612/057ce5dc75ca42d18adf5cf8496dfd87.jpeg","https://mp.weixin.qq.com/s?__biz=MzI1NTkxODcwNg==&mid=2247534739&idx=2&sn=4959c803240fd5ae3fa944526902f262&chksm=ea2c9f8edd5b16985735ff95abf810918988341ac9c4532ea1a9c914d3bd60daf52163b90e21&scene=27","2022-07-21 06:00"));
            communications.add(new Communication("晚稻优质高产栽培技术","","https://mp.weixin.qq.com/s?__biz=MzAwMjExMzEzMg==&mid=2650803203&idx=1&sn=7ff46b90b89ea36b26c1b64a299ed0d5&chksm=813bc700b64c4e16430397039978e25d4bcec81ae75194e649b236d77e7511078b1ab6282be0&scene=27","2023-07-31 14:52"));
            communications.add(new Communication("大白菜栽培技术","","https://m.qnong.com.cn/zhongzhi/shucai/2229.html","2014-03-04 13:33:49"));

            communicationliveData.postValue(communications);
        }
        return communicationliveData;
    }
}
